<template>
    <view class="page">
		<view class="TopImg">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				indicator-active-color="#00a4fd" indicator-color="#fff">
				<swiper-item  :key="index">
					<image src="../../static/icons/banner1.png" alt="" class="Img" mode="scaleToFill"></image>
				</swiper-item>
				<!-- <swiper-item  :key="index">
					<image src="../../static/icons/banner2.png" alt="" class="Img" mode="scaleToFill"></image>
				</swiper-item> -->
			</swiper>  
			<view class="logo">
				<image src="../../static/icons/logo.png" mode="scaleToFill"></image>
			</view>
		</view>
		<view class="box2">
			<view class="CenterBox">
				<view class="centerbody">
					<image src="../../static/icons/indexCenter.png" mode="scaleToFill"></image>
				</view>
				<view class="btnBox">
					<view class="openDoor" @click="openCondition" disabled="isOpening">
						<view>立即</view>
						<view>开门</view>
					</view>
				</view>
			</view>
		</view>
		<view class="box3">
			<view class="info">
				<view class="pic">
					<image src="/static/icons/indexPeople.png" mode="scaleToFill"></image>
				</view>		
				<view class="name">
					<text>喝奶君</text>
				</view>
				<view class="LoginBox" @click="LoginJump" v-show="userId==''">
					<text>立即登录</text>
				</view>
				<view class="LoginBox"  v-show="userId!=''">
					<text>已登录</text>
				</view>					
			</view>
		</view> 
		<view class="box4">
			<view class="info">
				<view class="left">
					<view class="pic" @click="activeJump">
						<image src="../../static/icons/indexlogo2.png" mode="scaleToFill"></image>
					</view>
					 <view class="text">
					 	<text>领券中心</text>
					 </view>
				</view>
				<view class="right" @click="JumpMyCoupon">
					<view class="pic">
						<image src="../../static/icons/indexlogo1.png" mode="scaleToFill"></image>
					</view>
					 <view class="text" >
					 	<text>我的优惠券</text>
					 </view>
				</view>
			</view>
		</view>
        <!-- <view class="coupons" v-if="!imgUrls.length">
			<swiper circular indicator-dots autoplay="true" interval="2500">
				<swiper-item @click="activeJump" v-for="(item,index) in banner" :key="index"
					v-if="(item.statusName!=='结束')">
					<img :src="getBanner(item.banner)" alt="" style="width: 100%;height: 150px;">
					</img>
				</swiper-item>
			</swiper>
		</view> -->
        <!-- 		<view class="swiper-banner" v-if="imgUrls.length ">
			<swiper class="swiper" :autoplay="true">
				<swiper-item v-for="(item,index) in imgUrls" :key="index">
					<image mode="scaleToFill" :src="item.banner"></image>
				</swiper-item>
			</swiper>
		</view>
 -->
        <!-- <view :class="[imgUrls.length ? 'content' : 'content nobanner']" v-if="contentList.length"> -->
            <!-- <view class="classyList">
				<view class="classy" :class="{active:index==classyIndex}" @click="classySelect(index)" v-for="(item,index) in contentList">{{item.typeName}}</view>
			</view> -->

            <!-- 			<view class="produceList">
				<scroll-view scroll-y="true" style="height: 100%;">
					<view class="title">{{contentList[classyIndex].typeName}}</view>
					<view class="produce" v-for="(item,index) in contentList[classyIndex].list">
						<view class="icon">
							<image :src="item.pic || '/static/icons/goods.png'" mode="scaleToFill"></image>
						</view>
						<view class="msg">
							<view class="name">{{item.name}}</view>
							<view class="price">优惠价：￥{{item.coupon}}</view>
						</view>
					</view>
				</scroll-view>view
			</view> -->

          <!--  <scroll-view scroll-y="true" style="height: 100%">
                <view class="uni-flex uni-row">
                    <view class="product-item" v-for="(item,index) in contentList[classyIndex].list" :key="index">
                        <image :src="item.urlPhoto || '/static/icons/goods.png'" mode="aspectFit"></image>
                        <view class="product-name">{{item.goodsName}}</view>
                        <view class="product-name">维他柠檬茶</view>
                        <view class="coupon">{{item.salePrice}}元</view>
                    </view>
                </view>
            </scroll-view> -->
        <!-- </view> -->

       <!-- <block>
            <view class="empty" v-if="!state.deviceId || state.deviceId == ''" @click="scanToGetData">
                <image src="/static/icons/scan.png" mode="scaleToFill"></image>
                扫设备上的二维码开始使用，轻触开启扫码
            </view>
        </block> -->

        <!-- <view class="content" v-if="false">
            <view class="module">
                <view class="title">热销商品</view>

                <view class="blocks">
                    <view class="block" v-for="(item, index) in goodsList" :key="index">
                        <image :src="item.pic" mode="scaleToFill"></image>
                        <view class="name">{{item.name}}</view>
                    </view>
                </view>
            </view>
            <block v-if="goodsList.length == 0">
                <view class="empty" v-if="!deviceId">
                    <image src="/static/icons/scan.png" mode="scaleToFill"></image>
                    轻触开启扫码
                </view>
            </block>

            <view class="noMore" v-if="noMore">没有更多数据了</view>
        </view> -->
        <view class="footer">
            <view class="contents">
				<view class="nav" @click="IndexJump">
				    <image src="../../static/icons/home2.png" ></image>
				    <view class="text">首页</view>
				</view>
				<view class="nav" @click="orderJump">
				    <image src="../../static/icons/order.png" ></image>
				    <view class="text">订单</view> 
				</view> 
				<view class="nav1" @click="scanToGetData">
					<view class="image">
						<image src="../../static/icons/scan.png"  mode="scaleToFill"></image>
					</view>
				    <view class="text">扫码开门</view>
				</view>
                <view class="nav" @click="fault">
                    <image src="../../static/icons/setting.png" ></image>
                    <view class="text">报修</view>
                </view>
                <view class="nav" @click="mine">
                    <image src="../../static/icons/mine.png" ></image>
                    <view class="text">我的</view>
                </view> 
               <!-- <view class="open-wrapper" @click="openCondition" disabled="isOpening"> -->
                    <!-- #ifdef MP-WEIXIN -->
                    <!-- <image class="logo" src="../../static/icons/payscore_logo.png" v-if="needUserConfirm" /> -->
                    <!-- #endif -->
                    <!-- <view class="open">立即开门</view> -->
                <!-- </view> -->
                <!-- #ifdef MP-WEIXIN -->
              <!--  <view class="slogan-wechat">
                    <image class="payscore-logo" src="../../static/icons/payscore_logo.png" mode="widthFix" />
                    <label class="payscore-text">微信支付分</label>
                    <label class="vertical-bar">|</label>
                    <label class="payscore-text">550分及以上优享</label>
                </view> -->
                <!-- #endif -->
            </view>
        </view>
      <!--  <view class="contact-service" @click="serviceContact" v-if="needUserConfirm">
            <image class="contact-logo" src="../../static/icons/contact.png" />
            <view class="contact-text">客服</view>
        </view> -->
    </view>
</template>

<script>
    import index from "./index.js";
    export default index;
</script>

<style  lang="scss" scoped>
    @import url("./index.css");
</style>